home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / dbtable.dxr / 00010_row header subtable.ls < prev    next >
Encoding:
Text File  |  2000-01-18  |  1.1 KB  |  44 lines

  1. property ancestor
  2.  
  3. on new me, tableName, castName, tableChannel, xLoc, vSlider, HSlider, descendant
  4.   if objectp(descendant) then
  5.     PassVar = descendant
  6.   else
  7.     PassVar = me
  8.   end if
  9.   ancestor = new(script("subtable object"), tableName, castName, tableChannel, xLoc, vSlider, HSlider, PassVar)
  10.   return me
  11. end
  12.  
  13. on trackMouse me
  14.   setThumb(me.pHSlider, 1)
  15.   startCell = cellToPoint(me._me, sprite(me.pTableChannel).mouseCell)
  16.   setAt(startCell, 1, 0)
  17.   trackMouse(me.pSuperTable, startCell)
  18.   return me
  19. end
  20.  
  21. on CalcCenterofRect me, xRect
  22.   if the machineType = 256 then
  23.     l = getAt(xRect, 1)
  24.     t = getAt(xRect, 2)
  25.     R = getAt(xRect, 3)
  26.     b = getAt(xRect, 4)
  27.     xCenter = (R - l) / 2
  28.     if ((l mod 2) = 1) and ((R mod 2) = 1) then
  29.       xCenter = xCenter - 1
  30.     end if
  31.     if ((l mod 2) = 1) and ((R mod 2) = 0) then
  32.       xCenter = xCenter - 1
  33.     end if
  34.     yCenter = (b - t) / 2
  35.     if ((t mod 2) = 1) and ((b mod 2) = 1) then
  36.       yCenter = yCenter - 2
  37.     end if
  38.     xPoint = point(l + xCenter, t + yCenter)
  39.   else
  40.     xPoint = RectToLoc(xRect)
  41.   end if
  42.   return xPoint
  43. end
  44.